<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


Route::group(['namespace'=>'api'],function (){
    //登录
    Route::post("login",[\App\Http\Controllers\LoginController::class,"userLogin"]);
//获取验证码
    Route::post("getcaptcha",[\App\Http\Controllers\LoginController::class,"getCaptcha"]);
//手机登录
    Route::post("phonelogin",[\App\Http\Controllers\LoginController::class,"phonelogin"]);
//授权登录
    Route::post("authorizationlogin",[\App\Http\Controllers\LoginController::class,"authorizationlogin"]);
});



Route::group(['namespace'=>'api','middleware'=>\App\Http\Middleware\User::class],function (){
//获取用户信息
    Route::get('usermessage',[\App\Http\Controllers\LoginController::class,'userMessage']);
//获取经纪人信息
    Route::get('brokermessage',[\App\Http\Controllers\LoginController::class,'brokerMessage']);
//    排行榜
    Route::get('rankinglist',[\App\Http\Controllers\RankingListController::class,'rankingList']);
//    好友列表
    Route::get('friend',[\App\Http\Controllers\FriendController::class,'friendList']);
//    发送好友消息
    Route::get('sendfriend',[\App\Http\Controllers\FriendController::class,'sendFriend']);
//    获取私聊消息
    Route::get('searchfriend',[\App\Http\Controllers\FriendController::class,'searchMessage']);
//    获取自己和好友的IM账号
    Route::get('userim',[\App\Http\Controllers\FriendController::class,'userIM']);
});


//直播测试
Route::get('aa',function (){
    return view('live');
});


